/**
 * Modern C++ features test cases for TIR
 */

#include <vector>
#include <memory>
#include <string>
#include <optional>
#include <variant>
#include <tuple>
#include <type_traits>

// C++14 and later features
template<typename T>
using VectorPtr = std::unique_ptr<std::vector<T>>;

template<typename... Args>
using VariantType = std::variant<Args...>;

int main() {
    // C++14 auto return type deduction
    auto lambda = [](auto x) { return x * 2; };                              // Line 22
    
    // C++17 structured bindings with auto
    auto [first, second] = std::make_pair(42, "hello");                       // Line 25
    
    // C++17 optional
    std::optional<std::vector<int>> optional_vector;                          // Line 28
    
    // C++17 variant
    std::variant<int, double, std::string> variant_value;                     // Line 31
    
    // Template alias usage
    VectorPtr<std::string> vector_ptr;                                        // Line 34
    
    // Variadic template usage
    VariantType<int, double, std::string, std::vector<int>> complex_variant;  // Line 37
    
    // Tuple with multiple template parameters
    std::tuple<int, std::string, std::vector<double>, 
               std::map<std::string, int>> complex_tuple;                     // Line 41
    
    // SFINAE and type traits (if supported)
    std::enable_if_t<std::is_integral_v<int>, std::vector<int>> 
        conditional_vector;                                                    // Line 45
    
    // C++20 concepts (if available)
    #if __cplusplus >= 202002L
    // This would require concepts support
    // std::same_as<int> auto concept_var = 42;
    #endif
    
    // Generic lambda with auto
    auto generic_lambda = [](auto&& container) -> auto {
        return container.size();
    };                                                                        // Line 56
    
    return 0;
}